//
//  FirstLaunchViewController.m
//  半糖
//
//  Created by RenShuang on 15/9/18.
//  Copyright (c) 2015年 shuang. All rights reserved.
//

#import "FirstLaunchViewController.h"
#import "BaseHeader.h"

@interface FirstLaunchViewController ()

@end

@implementation FirstLaunchViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
    scrollView.contentSize = CGSizeMake(SCREEN_WIDTH*3, 0);
    [self.view addSubview:scrollView];
    [scrollView release];
    
    for (int i = 0; i < 3; i++) {
        UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH*i, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
        imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"引导页%d.jpg",i+1]];
        [scrollView addSubview:imageView];
        [imageView release];
        
        if (i == 2) {
            UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
            button.frame = CGRectMake(SCREEN_WIDTH-75, SCREEN_HEIGHT*4/5, 150, 80);
            button.backgroundColor = [UIColor yellowColor];
            [button setTitle:@"Let's GO!GO!GO!" forState:UIControlStateNormal];
            [button addTarget:self action:@selector(click) forControlEvents:UIControlEventTouchUpInside];
            [imageView addSubview:button];
        }
    }
    
    
    
    
}

- (void)click
{
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
